import { EntityModel } from "@midwayjs/orm";
import {Column, PrimaryGeneratedColumn,OneToOne, JoinColumn} from 'typeorm'
import {Pet} from './pets'

@EntityModel('petpic')
export class Petpic {
    @PrimaryGeneratedColumn()
    id:number;

    @Column()
    petid:string;

    @Column()
    imageurl:string;

    @OneToOne(type => Pet,pet =>pet.petpic)

    @JoinColumn({ name: 'petid' })
    pet:Pet
}
